<ui:composition
  xmlns="http://www.w3.org/1999/xhtml"
  xmlns:ui="http://java.sun.com/jsf/facelets"
  xmlns:h="http://java.sun.com/jsf/html"
  xmlns:c="http://java.sun.com/jstl/core"
  xmlns:nxh="http://nuxeo.org/nxweb/html"
  xmlns:nxu="http://nuxeo.org/nxweb/util"
  xmlns:nxw="http://nuxeo.org/nxforms/runtime/widget"
  xmlns:nxl="http://nuxeo.org/nxforms/layout">

<h:form enctype="multipart/form-data" id="document_edit" styleClass="safeEditEnabled" >

  <nxl:documentLayout mode="edit" value="#{currentDocument}" />

  <nxl:layout name="document_edit_form_options"
    mode="edit" value="#{currentDocument}" />

  <div class="buttonsGadget">
   <nxw:documentEditButtons mode="view" value="#{currentDocument}" />
  </div>

  <h:outputScript target="#{pageJsTarget}">
    jQuery(document).ready(function() {
      jQuery('#document_edit').focusFirst();
      jQuery('#document_edit').initSafeEditOnForm("#{currentDocument.id}", "#{messages['safeedit.page.has.unsaved.changes']}");
    });
  </h:outputScript>

</h:form>

</ui:composition>